
<script>
function OnSubmitForm(){
	if(document.pressed == "Search Resident"){
		if(document.searchform.student_number.value!=""){
			document.searchform.action ="<?php echo base_url();?>index.php/residentController/loadSearchResidentView/"+document.searchform.student_number.value;
			return true;
		}else{
			alert("Please enter student number!");
			return false;
		}
	}else if(document.pressed == "Back to Main"){
		document.searchform.action ="<?php echo base_url();?>index.php/adminPageController/";
		return true;
	}
}
</script>
